<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /><!--图标--> 
<link rel="stylesheet" type="text/css" href="css/style.css" /><!--按钮-->
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" src="js/tree.js"></script>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function(){
    $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
    $('.tree li.parent_li > span').on('click', function (e) {
        var children = $(this).parent('li.parent_li').find(' > ul > li');
        if (children.is(":visible")) {
            children.hide('fast');
            $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
        } else {
            children.show('fast');
            $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
        }
        e.stopPropagation();
    });
});
</script>
</head>
<body>
<div id="pagelayout">
<div id="lefttree" class="catalogtree">
<div class="tree well">
	<ul>
		<li>
			<span><i class="icon-folder-open"></i>目录</span>
			<ul>
				<li>
					<span><i class="icon-folder-open"></i>b1</span>	
					<ul>
						<li>
							<span><i class="icon-leaf"></i><a href="myfile/b1/bfile1.txt">bfile1.txt</a></span>
						</li>
						<li>
							<span><i class="icon-leaf"></i>bfile2.txt</span>
						</li>
					</ul>
				</li>
				<li>
					<span><i class="icon-folder-open"></i>c1</span>
					<ul>
						<li>
							<span><i class="icon-leaf"></i>a1file1.txt</span>
						</li>
						<li>
							<span><i class="icon-leaf"></i>z1file2.txt</span>
						</li>
					</ul>
				</li>
				<li>
					<span><i class="icon-leaf"></i>file1.txt</span>
				</li>
				<li>
					<span><i class="icon-leaf"></i>file2.txt</span>
				</li>
				<li>
					<span><i class="icon-leaf"></i>file3.txt</span>
				</li>
			</ul>
		</li>
	</ul>
</div>
</div>
<div id="testeditor" class="testeditor">
<div id="filetab" class="filetab">保留哈</div>	
<textarea id="textarea" type="text" class="textarea" ></textarea>

<script>
(function settextareaheight(){
var h = filetab.offsetHeight;
var tt = document.getElementById("textarea");
tt.style.height =600-h+'px';
//ergodic();
}());
window.onload=ergodic();
</script>
</div>
</div>
</body>
</html>